package com.bt.lms.ui.page.school_education.query_details;

import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;

/**
 * 详情学籍信息界面
 */
public class PageCheckStudentStatus extends VBox {

    private Integer baseWidth = 1230;

    public PageCheckStudentStatus(PageCheckManage pageCheckManage){
        VBox totalVBox = new VBox();
        totalVBox.setPrefWidth(1280);

        HBox mesHBox = new HBox();
        Label studentBasic = new Label("招生计划A-班级1-灭霸学员档案基本信息");
        studentBasic.setFont(Font.font("圆体", 20));
        mesHBox.getChildren().addAll(studentBasic);
        totalVBox.getChildren().add(mesHBox);

        Label statusBasicMes = new Label("学籍基本信息");
        statusBasicMes.setFont(Font.font("圆体",20));
        HBox hBox1 = new HBox();
        hBox1.setPrefWidth(1280);
        hBox1.setStyle("-fx-background-color: #cec9c9");
        hBox1.getChildren().add(statusBasicMes);
        totalVBox.getChildren().add(hBox1);
        totalVBox.setSpacing(10);

        ScrollPane scrollPane = new ScrollPane();
        scrollPane.setPrefWidth(1280);
        //设置滚动盒子只有竖向
        scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
        scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);

        HBox one = new HBox();
        one.setPrefWidth(baseWidth);
        one.setPadding(new Insets(10));
        one.setSpacing(10);
        VBox one1 = new VBox();
        one1.setPrefWidth((double) baseWidth /6);
        one1.setSpacing(10);
        Label numberLab = new Label("学员编号");
        Label nameLab = new Label("姓名");
        Label schoolDataLab = new Label("入学年月");
        Label classroomNameLab = new Label("班级名称");
        Label studyCentreLab = new Label("学习中心");
        Label specialtyLab = new Label("专业");
        one1.getChildren().addAll(numberLab,nameLab,schoolDataLab,classroomNameLab,studyCentreLab,specialtyLab);
        one.getChildren().add(one1);

        VBox one2 = new VBox();
        one2.setPrefWidth((double) baseWidth /3);
        one2.setSpacing(10);
        Label numberMes = new Label("202301");
        Label nameLabMes = new Label("灭霸");
        Label schoolDataLabMes = new Label();
        Label classroomNameLabMes = new Label();
        Label studyCentreLabMes = new Label();
        Label specialtyLabMes = new Label();
        one2.getChildren().addAll(numberMes,nameLabMes,schoolDataLabMes,classroomNameLabMes,studyCentreLabMes,specialtyLabMes);
        one.getChildren().add(one2);


        VBox one3 = new VBox();
        one3.setPrefWidth((double) baseWidth /6);
        one3.setSpacing(10);
        Label certificateTypeLab = new Label("证件类型");
        Label certificatePhoneLab = new Label("证件号码");
        Label educationalSystemLab = new Label("学制");
        Label enpPlanLab = new Label("招生计划");
        Label currentStateLab = new Label("学生当前状态");
        one3.getChildren().addAll(certificateTypeLab,certificatePhoneLab,educationalSystemLab,enpPlanLab,currentStateLab);
        one.getChildren().add(one3);

        VBox one4 = new VBox();
        one4.setPrefWidth((double) baseWidth /3);
        one4.setSpacing(10);
        Label certificateTypeLabMes = new Label("身份证");
        Label certificatePhoneLabMes = new Label("140524200112290010");
        Label educationalSystemLabMes = new Label();
        Label enpPlanLabMes = new Label();
        Label currentStateLabMes = new Label();
        one4.getChildren().addAll(certificateTypeLabMes,certificatePhoneLabMes,educationalSystemLabMes,enpPlanLabMes,currentStateLabMes);
        one.getChildren().add(one4);
        totalVBox.getChildren().add(one);

        //初始化注册信息
        initRegisterBox(totalVBox);

        scrollPane.setContent(totalVBox);
        this.getChildren().add(scrollPane);

    }

    /**
     * 初始化注册信息
     * @param totalVBox 主盒子
     */
    private void initRegisterBox(VBox totalVBox) {
        VBox vBox = new VBox();
        Label RegisterMes = new Label("注册信息");
        RegisterMes.setFont(Font.font("圆体",20));
        HBox hBox1 = new HBox();
        hBox1.setPrefWidth(1280);
        hBox1.setStyle("-fx-background-color: #cec9c9");
        hBox1.getChildren().add(RegisterMes);
        vBox.getChildren().add(hBox1);
        vBox.setSpacing(10);


        //注册信息的主盒子
        HBox totalHBox = new HBox();
        totalHBox.setPrefWidth(baseWidth);
        totalHBox.setSpacing(10);
        totalHBox.setPadding(new Insets(10));

        VBox one1 = new VBox();
        one1.setPrefWidth(baseWidth/8);
        one1.setSpacing(10);
        Label registerConditionLab = new Label("注册状况");
        Label noRegisterCauseLab = new Label("未注册原因");
        Label schoolYearLab = new Label("学年（度）");
        one1.getChildren().addAll(registerConditionLab,noRegisterCauseLab,schoolYearLab);
        totalHBox.getChildren().add(one1);

        VBox one2 = new VBox();
        one2.setPrefWidth(baseWidth/6);
        one2.setSpacing(10);
        Label registerConditionLabMes = new Label();
        Label noRegisterCauseLabMes = new Label();
        Label schoolYearLabMes = new Label();
        one2.getChildren().addAll(registerConditionLabMes,noRegisterCauseLabMes,schoolYearLabMes);
        totalHBox.getChildren().add(one2);


        VBox one3 = new VBox();
        one3.setPrefWidth(baseWidth/8);
        one3.setSpacing(10);
        Label registerDataLab = new Label("注册日期");
        Label noRegisterWhereaboutsLab = new Label("未注册/报道去向");
        Label semesterLab = new Label("学期");
        one3.getChildren().addAll(registerDataLab,noRegisterWhereaboutsLab,semesterLab);
        totalHBox.getChildren().add(one3);

        VBox one4 = new VBox();
        one4.setPrefWidth(baseWidth/6);
        one4.setSpacing(10);
        Label registerDataLabMes = new Label();
        Label noRegisterWhereaboutsLabMes = new Label();
        Label semesterLabMes = new Label();
        one4.getChildren().addAll(registerDataLabMes,noRegisterWhereaboutsLabMes,semesterLabMes);
        totalHBox.getChildren().add(one4);




        VBox one5 = new VBox();
        one5.setPrefWidth(baseWidth/8);
        one5.setSpacing(10);
        Label reportDataLab = new Label("报道日期");
        Label whetherAskLab = new Label("是否请假");
        Label classroomLab = new Label("所在班级");
        one5.getChildren().addAll(reportDataLab,whetherAskLab,classroomLab);
        totalHBox.getChildren().add(one5);

        VBox one6 = new VBox();
        one6.setPrefWidth(baseWidth/6);
        one6.setSpacing(10);
        Label reportDataLabMes = new Label();
        Label whetherAskLabMes = new Label();
        Label classroomLabMes = new Label();
        one6.getChildren().addAll(reportDataLabMes,whetherAskLabMes,classroomLabMes);
        totalHBox.getChildren().add(one6);


        vBox.getChildren().add(totalHBox);
        totalVBox.getChildren().add(vBox);


    }



}
